package com.cogent.dao.domain;

import java.util.ArrayList;
import java.util.List;

public class SqlDomain {
	//待执行的SQL
	private String sql;
	//待绑定的参数变量
	private List<ParamDomain> param;
	//待执行的下级SQL信息
	private List<SqlDomain>subSqlList = new ArrayList<SqlDomain>();
	
	//当前数据的ID
	private String id;
	
	public String getSql() {
		return sql;
	}
	public void setSql(String sql) {
		this.sql = sql;
	}
	public List<ParamDomain> getParam() {
		return param;
	}
	public void setParam(List<ParamDomain> param) {
		this.param = param;
	}
	public List<SqlDomain> getSubSqlList() {
		return subSqlList;
	}
	public void setSubSqlList(List<SqlDomain> subSqlList) {
		this.subSqlList = subSqlList;
	}
	public void putSubSql(String sql, List<ParamDomain> param) {
		SqlDomain sqlDomain = new SqlDomain();
		sqlDomain.setSubSqlList(null);
		sqlDomain.setSql(sql);
		sqlDomain.setParam(param);
		subSqlList.add(sqlDomain);
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
}
